﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ProductList.ascx.cs"
    Inherits="ProductManagement.Controls.ProductList" %>
Product List
<asp:Label ID="lblCount" runat="server" />
<asp:GridView ID="grdProductList" runat="server" AutoGenerateColumns="False" AllowSorting="True" DataSourceID="objProductList"
     AllowPaging="True" PageSize="5" DataKeyNames="ID" EmptyDataText="<b>There is no product to show</b>" OnSelectedIndexChanged="grdProducts_SelectedIndexChanged">
    <AlternatingRowStyle BackColor="#33CCFF" />
    <Columns>
        <asp:TemplateField HeaderText="No" ItemStyle-HorizontalAlign="Left">
            <ItemTemplate>
                <%#Container.DataItemIndex+1 %>
            </ItemTemplate>
            <ItemStyle HorizontalAlign="Left"></ItemStyle>
        </asp:TemplateField>
        <asp:TemplateField HeaderText="ID" SortExpression="ID" AccessibleHeaderText="ID">
            <ItemTemplate>
                <asp:LinkButton ID="lbtID" Text='<%#Eval("ID") %>' runat="server" CommandName="select" />
            </ItemTemplate>
            <ItemStyle HorizontalAlign="Left"></ItemStyle>
        </asp:TemplateField>
        <asp:TemplateField HeaderText="Tên hàng hóa" SortExpression="NAME" AccessibleHeaderText="NAME">
            <ItemTemplate>
                <%#Eval("NAME")%>
            </ItemTemplate>
            <ItemStyle HorizontalAlign="Center"></ItemStyle>
        </asp:TemplateField>
        <asp:TemplateField HeaderText="SL" ItemStyle-HorizontalAlign="Left">
            <ItemTemplate>
                <%# Eval("QUANTITY")%>
            </ItemTemplate>
            <ItemStyle HorizontalAlign="Left"></ItemStyle>
        </asp:TemplateField>
        <asp:TemplateField HeaderText="ĐVT" ItemStyle-HorizontalAlign="Left">
            <ItemTemplate>
                <%#Eval("UNITNAME")%>
            </ItemTemplate>
            <ItemStyle HorizontalAlign="Left"></ItemStyle>
        </asp:TemplateField>
    </Columns>
    <HeaderStyle HorizontalAlign="Left" BackColor="#0066CC" />
    
    <SelectedRowStyle BackColor="#FFCC66" />
    
</asp:GridView>
<asp:ObjectDataSource ID="objProductList" runat="server" SelectMethod="GetProductList" SelectCountMethod="GetProductCount" EnablePaging="true" TypeName="ProductManagement.ProductManager">
<SelectParameters>

<asp:Parameter DefaultValue="10" Name="startRowIndex" Type="Int32" />

<asp:Parameter DefaultValue="100" Name="maximumRows" Type="Int32" />

</SelectParameters>
</asp:ObjectDataSource>
<asp:HiddenField ID="txtSelectedId" runat="server" />
